<template>
  <div>
      <div class="con">
          <h2>热门品牌</h2>
          <ul>
              <li v-for="(item,index) in arr" :key="index">
                  <img :src="item.img" alt="">
                  <span>
                      {{item.title}}
                  </span>
              </li>
          </ul>
      </div>
  </div>
</template>

<script>
import {one} from "@/api/topapi.js"
export default {
    data(){
        return{
            arr:[]
        }
    },
    mounted(){
        one().then((ok)=>{
            this.arr=ok.data.status
        })
    }
}
</script>

<style lang="scss" scoped>
    .con{
        width: 100%;
        height: 2.19rem;
        background-color: #fff;
        border-radius: 0.2rem;
        margin-top: -0.2rem;
        overflow: hidden;
        h2{
            width: 100%;
            height: 0.43rem;
            font-size: 0.16rem;
            margin-top: 0.1rem;
            padding-left: 0.14rem;
        }
        ul{
            width: 100%;
            height: 1.45rem;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-around;
            li{
                width: 0.8rem;
                text-align: center;
                img{
                    width: 0.55rem;
                    height: 0.25rem;
                }
                span{
                    display: block;
                    font-size: 0.14rem;
                    color: #666;
                }
            }
        }
    }

</style>